<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sd="http://schemas.silverdiagram.net/sd/2010/xaml"
    xmlns:localShapes="clr-namespace:SD.Shapes.Samples.CustomNode">
    
    <Style TargetType="localShapes:MyNode">
        <Setter Property="BorderThickness" Value="2" />
        <Setter Property="BorderBrush" Value="Black" />
        <Setter Property="Background" Value="#99FF99"/>
        <Setter Property="Foreground" Value="Black" />
        <Setter Property="Width" Value="90" />
        <Setter Property="Height" Value="90" />
        <Setter Property="ConnectionStyle">
            <Setter.Value>
                <Style TargetType="sd:Connection">
                    <Setter Property="Thickness" Value="1" />
                    <Setter Property="SinkDecorator" Value="Arrow" />
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localShapes:MyNode">
                    <Grid>
                        <Polygon Points="1,10 1,4 0,4 5,0 10,4 9,4 9,10 6,10 6,7 4,7 4,10" 
                            Fill="{TemplateBinding Background}" 
                            Stroke="{TemplateBinding BorderBrush}"
                            StrokeDashArray="{TemplateBinding BorderDashArray}"  
                            StrokeThickness="{Binding RelativeSource={RelativeSource TemplatedParent},Path=BorderThickness.Left}"
                            StrokeLineJoin="Round" Stretch="Fill"/>

                        <sd:Connector HorizontalAlignment="Left" VerticalAlignment="Center" Margin="-4,0,0,0" />
                        <sd:Connector HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,-4,0" />
                        <sd:Connector HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,-4,0,0" />
                        <sd:Connector HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,-4" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
